package com.tebiecloud.store.client.service;

import com.tebiecloud.common.model.ResultBody;
import com.tebiecloud.store.client.model.entity.Store;
import com.tebiecloud.store.client.model.entity.StoreStaffWallet;
import com.tebiecloud.store.client.model.vo.DeductAmountVo;
import com.tebiecloud.store.client.model.vo.PlusAmountVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 员工钱包接口
 * @Author: tebie
 * @Date: 2019-09-15 20:34
 */
public interface IStoreStaffWalletServiceClient {

    /**
     * 获取员工钱包信息
     * @param userId
     * @return
     */
    @PostMapping("/feign/staffwallet/infoStoreStaffWallet")
    ResultBody<StoreStaffWallet> getStoreStaffWallet(@RequestParam("userId") long userId);

    /**
     * 扣员工钱包金额
     * @param amount 扣钱总金额，单位分
     * @param maxCoin 乖乖币抵扣上限
     * @return
     */
    @PostMapping("/feign/staffwallet/updateDeductAmount")
    ResultBody<DeductAmountVo> updateDeductAmount(@RequestParam("userId") long userId,@RequestParam("amount") int amount, @RequestParam("maxCoin") int maxCoin);

    /**
     * 添加员工钱包
     * @param balance 增加的余额，单位分
     * @param coin 增加的乖乖币
     * @return
     */
    @PostMapping("/feign/staffwallet/updatePlusAmount")
    ResultBody<PlusAmountVo> updatePlusAmount(@RequestParam("userId") long userId, @RequestParam("balance") int balance, @RequestParam("coin") int coin);

}
